<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box1{
      width: 300px;
      height: 300px;
      background-color: #f00;
    }
    .box2{
      width: 200px;
      height: 200px;
      background-color: #0f0;
    }
    .box3{
      width: 100px;
      height: 100px;
      background-color: #00f;
    }
  </style>
</head>
<body>
  <div class="box1">
    <div class="box2">
      <div class="box3"></div>
    </div>
  </div>
  <script>
    var oBox1 = document.querySelector(".box1")
    var oBox2 = document.querySelector(".box2")
    var oBox3 = document.querySelector(".box3")
    oBox1.addEventListener("click",function(){
      console.log("我是box1")
    })
    oBox2.addEventListener("click",function(){
      console.log("我是box2")
    },true)
    oBox3.addEventListener("click",function(){
      console.log("我是box3")
    })
  </script>
</body>
</html>